<template>
  <div class="seckill">
    <el-form-item label="预热时间" prop="prehead_time">
      <el-date-picker
        v-model="activityDetail.model.prehead_time"
        type="datetime"
        value-format="YYYY-MM-DD HH:mm:ss"
        format="YYYY-MM-DD HH:mm:ss"
        placeholder="预热时间"
        prefix-icon="Calendar"
        :disabled="activityStatus"
        :editable="false"
      />
    </el-form-item>
    <!-- 是否参与分销 -PRO- -->
    <el-form-item label="是否参与分销">
      <el-switch
        v-model="activityDetail.model.rules.is_commission"
        active-value="1"
        inactive-value="0"
        :disabled="activityStatus"
      ></el-switch>
      <span class="sa-m-l-8">
        {{ activityDetail.model.rules.is_commission == 0 ? '不参与' : '参与' }}
      </span>
    </el-form-item>
    <el-form-item label="是否包邮">
      <el-switch
        v-model="activityDetail.model.rules.is_free_shipping"
        active-value="1"
        inactive-value="0"
        :disabled="activityStatus"
      ></el-switch>
      <span class="sa-m-l-8">
        {{ activityDetail.model.rules.is_free_shipping == 0 ? '不包邮' : '包邮' }}
      </span>
    </el-form-item>
    <el-form-item label="秒杀销量展示">
      <el-radio-group
        v-model="activityDetail.model.rules.sales_show_type"
        :disabled="activityStatus"
      >
        <el-radio label="real">真实活动销量</el-radio>
        <el-radio label="goods">
          <div class="sa-flex">
            商品总销量
            <div class="tip sa-m-l-8">商品总销量包含虚拟销量</div>
          </div>
        </el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="限购数量">
      <el-input
        class="sa-w-120"
        v-positiveinteger
        v-model="activityDetail.model.rules.limit_num"
        type="number"
        :disabled="activityStatus"
      >
        <template #append>件</template>
      </el-input>
    </el-form-item>
    <el-form-item
      label="订单支付时间"
      prop="rules.order_auto_close"
      :rules="activityDetail.rules.order_auto_close"
    >
      <el-input
        class="sa-w-120"
        v-model="activityDetail.model.rules.order_auto_close"
        type="number"
        :disabled="activityStatus"
      >
        <template #append>分钟</template>
      </el-input>
    </el-form-item>
  </div>
</template>
<script setup>
  const props = defineProps(['activityDetail', 'activityStatus']);
</script>
